package text_2023_09_22;

import java.util.Calendar;
import java.util.Scanner;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/22 08:25:14
 */
public class TimeProblem {
    public static void main(String[] args) {
        Calendar beiJing = Calendar.getInstance();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请依次输入年月日 小时 分钟 秒");
        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();
        int hour = scanner.nextInt();
        int minute = scanner.nextInt();
        int second = scanner.nextInt();
        beiJing.set(year,month,day,hour,minute,second);
        beiJing.add(Calendar.HOUR,7);
        System.out.println(beiJing.get(Calendar.HOUR) + " " + beiJing.get(Calendar.MINUTE) + " " + beiJing.get(Calendar.SECOND));
        beiJing.add(Calendar.HOUR,5);
        System.out.println(beiJing.get(Calendar.HOUR) + " " + beiJing.get(Calendar.MINUTE) + " " + beiJing.get(Calendar.SECOND));
    }
}
